home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / utility / maken103.zip / MAKENAME.DOC < prev    next >
Text File  |  1996-09-11  |  13KB  |  303 lines

  1.  
  2.  ==============================================================================
  3.  ==============================================================================
  4.  ========================                               =======================
  5.  ========================           MAKENAME            =======================
  6.  ========================                               =======================
  7.  ==============================================================================
  8.  ==============================================================================
  9.  
  10.  
  11.                       
  12.            MakeName is Copyright (C) 1992, 1996 by Pinnacle Software
  13.            
  14.  
  15.          
  16.               Voice line:  +1-514-345-9578
  17.           Free Files BBS:  +1-514-345-8654 (2400 bps minimum)
  18.               CompuServe:  70154,1577
  19.                 Internet:  pinnacl@cam.org
  20.                      Web:  http://www.cam.org/~pinnacl
  21.              Head Office:  CP386, Mount Royal, QC, Canada H3P 3C6
  22.              U.S. Office:  Box 714, Airport Road, Swanton, VT 05488
  23.  
  24.  
  25.  
  26.         Original concept:  James Ludwick
  27.        Design and coding:  Timothy Campbell
  28.            Documentation:  Natasha Mirage
  29.             Distribution:  Kevin Beck
  30.         Support services:  L.Wilson, Z.Krome
  31.  
  32.  
  33.  
  34.  ==============================================================================
  35.  OVERVIEW
  36.  ==============================================================================
  37.  
  38.  
  39.  MakeName writes a batch file (named SETNAME.BAT) that uses the DOS SET command
  40.  to set a DOS environment variable to  an 8-character string  which  represents
  41.  the current date and time.  This can then be CALLed by a batch file that needs
  42.  such a string for some purpose (usually as part of a file name).
  43.  
  44.  
  45.  
  46.  ==============================================================================
  47.  WHY YOU NEED MAKENAME -- AN EXAMPLE
  48.  ==============================================================================
  49.  
  50.  
  51.  Sometimes you want to  create a batch file that you will run  once in a while,
  52.  which will create  a data file,  but since each file it creates is essentially
  53.  another version of the same data, you want to keep it in the same directory as
  54.  earlier copies.
  55.  
  56.  The usual way is to code the batch file is like this:
  57.  
  58.  
  59.  BATCH FILE "NEWDATA.BAT"                    EXPLANATION
  60.  ------------------------------------------- ----------------------------------
  61.  @ECHO OFF                                   Turn off command echoing
  62.  MAKEDATA                                    Run a program to make the file
  63.  RENAME DATA %1                              Rename the data file
  64.  
  65.  
  66.  You would then call up this batch file as in this example:
  67.  
  68.  NEWDATA FILE0001.DAT
  69.  
  70.  In other words, you are using the variable %1 to represent a unique file name.
  71.  
  72.  The problem with  this approach  is that you have to keep track of the various
  73.  files in the directory.   It would be nice to have a program that would create
  74.  a unique file name based on the date and time.
  75.  
  76.  That's precisely what MAKENAME does!
  77.  
  78.  
  79.  
  80.  ==============================================================================
  81.  INSTALLATION
  82.  ==============================================================================
  83.  
  84.  
  85.  The MakeName program (MAKENAME.EXE) should be placed in your DOS PATH.  For an
  86.  explanation of the DOS PATH command, consult your DOS manual.
  87.  
  88.  
  89.  
  90.  ==============================================================================
  91.  FILES
  92.  ==============================================================================
  93.  
  94.  
  95.  The MakeName package comprises the following files:
  96.  
  97.  ROOTNAME EXT  FILE PURPOSE   DESCRIPTION
  98.  -------- ---  -------------  -------------------------------------------------
  99.  READ     ME   Documentation  Directs your attention to MAKENAME.DOC
  100.  MAKENAME DOC  Documentation  How to use the MakeName utility (this file)
  101.  VENDOR   DOC  Documentation  Terms for sharing this software with other people
  102.  FILE_ID  DIZ  Documentation  (File used by some BBS's) Brief description
  103.  DESC     SDI  Documentation  (File used by some BBS's) Brief description
  104.  MAKENAME EXE  Program        The MakeName utility
  105.  EXAMPLE1 BAT  Batch file     Sample usage of MakeName
  106.  EXAMPLE2 BAT  Batch file     Sample usage of MakeName
  107.  ORDER    FRM  Form/Envelope  The order form, to register the MakeName utility
  108.  
  109.  
  110.  
  111.  ==============================================================================
  112.  THE FORMAT OF THE VARIABLE
  113.  ==============================================================================
  114.  
  115.  
  116.  The MAKENAME program writes  a short batch file  (named SETNAME.BAT) that uses
  117.  the DOS SET command to set a variable according to the date and time.  You can
  118.  then use this in your batch file, after CALLing it.
  119.  
  120.  The variable is eight characters long.  It uses this format:
  121.  
  122.  Format:    YMDHHMMS
  123.  Examples:  5230405K  (Created 1995/02/03, a little after 04:05)
  124.             6NP1631P  (Created 1996/11/23 [November 23 '96] just after 4:31 PM)
  125.  
  126.  Key:       Y ------- Year     The last digit (0 to 9); example: 1993 is 3
  127.             M ------- Month    The month number (1 to 9) or OND (Oct, Nov, Dec)
  128.             D ------- Day      The day of the month (1 to 9, A to W)
  129.             HH ------ Hour     Hour of the day; example: 6 PM is 18
  130.             MM ------ Minute   Minute of the hour
  131.             S ------- Second   Second (0 to 9, A to V)
  132.  
  133.  The  Second  value changes every  two seconds,  rather than every second.  The
  134.  letters used for  Day  and  Second  never  include  I or O,  as these could be
  135.  confused with the digits 1 or 0.
  136.  
  137.  For additional examples, you can run the sample batch file EXAMPLE1.BAT, which
  138.  generates a series of variables.   This batch file is described in the section
  139.  entitled "Sample Batch Files".
  140.  
  141.  
  142.  
  143.  ==============================================================================
  144.  USING THE MAKENAME COMMAND
  145.  ==============================================================================
  146.  
  147.  
  148.  COMMAND FORMAT
  149.  ==============
  150.  
  151.  The format of the MAKENAME command is:
  152.  
  153.  MAKENAME varname [time?]
  154.  
  155.  The "varname" parameter is required (not optional).   The "time?" parameter is
  156.  optional.  If both parameters are omitted,  the program displays a screen that
  157.  summarizes how it is used.
  158.  
  159.  The parameters are as follows:
  160.  
  161.  varname   This is the name of the  DOS enviroment variable  to be  SET  by the
  162.            batch file SETNAME.BAT.
  163.  
  164.  time?     (Optional)   Set this parameter to N if you don't want the time part
  165.            of the variable set.  In such case,  the variable will be only three
  166.            characters long and represent the year, month and day only.
  167.  
  168.  
  169.  
  170.  DUPLICATION
  171.  ===========
  172.  
  173.  Two names created two seconds or less apart will be the same.
  174.  Two names created precisely ten years apart will be the same.
  175.  
  176.  
  177.  
  178.  EXAMPLES
  179.  ========
  180.  
  181.  Here are some examples of the MakeName command:
  182.  
  183.  MAKENAME MYVAR
  184.  
  185.  This would write a batch file named SETNAME.BAT,  which would SET the variable
  186.  named  MYVAR  to a string representing  the date and time.   After CALLing the
  187.  SETNAME batch file, the variable %MYVAR% could be used in other batch files.
  188.  
  189.  MAKENAME MYFILE N
  190.  
  191.  This would write a batch file named SETNAME.BAT,  which would SET the variable
  192.  named MYFILE to a string representing the date only. After CALLing the SETNAME
  193.  batch file, the variable %MYFILE% could be used in other batch files.
  194.  
  195.  
  196.  
  197.  ERRORLEVELS
  198.  ===========
  199.  
  200.  The  success or failure  of the MakeName command  can be tested within a batch
  201.  file by using IF ERRORLEVEL, as follows:
  202.  
  203.  ERRORLEVEL   MEANING
  204.  ----------   -------
  205.       0       MakeName worked successfully
  206.     255       An error occured
  207.  
  208.  
  209.  
  210.  ==============================================================================
  211.  SAMPLE BATCH FILES
  212.  ==============================================================================
  213.  
  214.  
  215.  This section contains two sample batch files.  Copies of these batch files are
  216.  included in the MAKENAME package, as EXAMPLE1.BAT and EXAMPLE2.BAT.
  217.  
  218.  Here is a sample batch file that demonstrates the use of MAKENAME:
  219.  
  220.           
  221.  BATCH FILE "EXAMPLE1.BAT"                   EXPLANATION
  222.  ------------------------------------------- ----------------------------------
  223.  @ECHO OFF                                   Turn off command echoing
  224.  :AGAIN                                      Batch file label
  225.  MAKENAME XYZ                                Make the SETNAME.BAT file
  226.  CALL SETNAME.BAT                            Call it up
  227.  ECHO Variable XYZ is set to %XYZ%           Demonstrate
  228.  ECHO Press Ctrl-C to quit                   Tell user how to escape loop
  229.  PAUSE                                       Wait for a key
  230.  GOTO AGAIN                                  Loop back
  231.  
  232.  
  233.  Here is a sample batch file that backs up your current directory to diskette.
  234.  
  235.  
  236.  BATCH FILE "EXAMPLE2.BAT"                   EXPLANATION
  237.  ------------------------------------------- ----------------------------------
  238.  @ECHO OFF                                   Turn off command echoing
  239.  MAKENAME MYVAR                              Make the SETNAME.BAT file
  240.  CALL SETNAME.BAT                            Call it up
  241.  PKZIP -a %MYVAR%.ZIP *.*                    Save everything in a ZIP file (*)
  242.  COPY %MYVAR%.ZIP A:                         Copy the ZIP file to the diskette
  243.  DEL %MYVAR%.ZIP                             Erase ZIP file
  244.  DIR A:                                      Show what's on A:
  245.  
  246.  
  247.  (*) PKZIP is an excellent  file compression  program  created  by  PKWare Inc.
  248.      (PKWARE, Inc. 7545 N. Port Washington Rd,. Glendale, Wisconsin 53217 USA.)
  249.      An alternative is the freeware program LHA.
  250.  
  251.  
  252.  
  253.  ==============================================================================
  254.  LICENSING
  255.  ==============================================================================
  256.  
  257.  This product is available in several forms.  For billing and pricing
  258.  information, view or print the file ORDER.FRM.
  259.  
  260.  TRIAL COPY:  If you have a "test-drive" evaluation copy, you will see a
  261.  "Registration Reminder Screen" when you start up the program.  You are
  262.  entitled to evaluate this program at no cost for 3 months.  If you continue to
  263.  use it after that, you must register your copy and purchase a license, as
  264.  described below.
  265.  
  266.  SINGLE-USER LICENSE:  When you register an evaluation copy of this product,
  267.  you will receive the latest version, plus an unlocking code that will let you
  268.  register any new evaluation versions that we release for a period of two years
  269.  (six years for deluxe registration).
  270.  
  271.  SITE/MULTI-COPY LICENSES:  If you plan to run 15 or more copies of this
  272.  program (on a network or on separate computers), you can obtain quantity
  273.  pricing.  For details, view or print the text file ORDER.FRM.
  274.  
  275.  LAN LICENSE:  Local Area Network users must purchase a license for each user
  276.  (see "Single-User License" and "Site/Multi-Copy Licenses"), although they can
  277.  reduce this amount if they have run-control software which sets an upper limit
  278.  on the number of concurrent users for a given program.
  279.  
  280.  WAN LICENSE:  Wide Area Networks are treated like LANs, but you may find it
  281.  more economical to purchase a Distribution License (see below).
  282.  
  283.  DISTRIBUTION LICENSE:  The distribution license allows you to use an unlimited
  284.  number of copies.  You may include it in your application or commercial
  285.  package as a utility.  The only restriction is that you may not distribute
  286.  this document (i.e. the user manual) or its essential content. With this
  287.  safeguard, we avoid placing ourselves in competition with you; the program
  288.  must be used to support an application or product rather than being its main
  289.  feature.
  290.  
  291.  SOURCE CODE LICENSE:  If you purchase the Turbo Pascal source code, you must
  292.  also purchase a license for each machine that will run the modified program.
  293.  Those portions of the source code written by Pinnacle Software remain
  294.  copyrighted by Pinnacle, and may not be divulged to another party. As an
  295.  alternative to purchasing the source code, you can also contract for us to
  296.  make custom modifications to the program.
  297.  
  298.  RETAIL LICENSE:  You can sell complete, registered copies of this product,
  299.  complete with documentation, in return for royalties.  The terms depend on
  300.  volume and advance payments. Contact us for details.
  301.  
  302.  
  303.